Skip to content

[3.15] gh-149590: Remove faulthandler_traverse (GH-150023)#150037

Merged
JelleZijlstra merged 1 commit into
python:3.15from
miss-islington:backport-5673748-3.15
May 18, 2026
Merged

[3.15] gh-149590: Remove faulthandler_traverse (GH-150023)#150037
JelleZijlstra merged 1 commit into
python:3.15from
miss-islington:backport-5673748-3.15

Conversation

@miss-islington
Copy link
Copy Markdown
Contributor

@miss-islington miss-islington commented May 18, 2026

faulthandler_traverse visits Python objects owned by _PyRuntime, not
by the module instance. With multi-phase init allowing multiple module
instances, each instance's GC traversal decrements gc_refs on the same
runtime-owned objects, driving it negative when two instances are
collected simultaneously.
(cherry picked from commit 5673748)

Co-authored-by: Armaan Vakharia 43391096+armaan-v924@users.noreply.github.com

`faulthandler_traverse` visits Python objects owned by `_PyRuntime`, not
by the module instance. With multi-phase init allowing multiple module
instances, each instance's GC traversal decrements `gc_refs` on the same
runtime-owned objects, driving it negative when two instances are
collected simultaneously.
(cherry picked from commit 5673748)

Co-authored-by: Armaan Vakharia <43391096+armaan-v924@users.noreply.github.com>
@python-cla-bot
Copy link
Copy Markdown

python-cla-bot Bot commented May 18, 2026

All commit authors signed the Contributor License Agreement.

CLA signed

@JelleZijlstra JelleZijlstra enabled auto-merge (squash) May 18, 2026 23:24
@JelleZijlstra JelleZijlstra merged commit c417fca into python:3.15 May 18, 2026
56 checks passed
@miss-islington miss-islington deleted the backport-5673748-3.15 branch May 18, 2026 23:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants